#include <iostream>
#include <unistd.h>

int main()
{
    int fds[2] = {0};
    int n = pipe(fds);
    if(n != 0)
    {
        std::cerr << "pipe error" << std::endl;
        return 1;
    }
    std::cout << "ok" << std::endl;
    std::cout << "ok" << std::endl;
    std::cout << "ok" << std::endl;
    std::cerr << "pipe error" << std::endl;
    std::cerr << "pipe error" << std::endl;
    std::cerr << "pipe error" << std::endl;
    return 0;
}



